<div class="am-g">
    <!-- Row start -->
    <div class="am-u-sm-12">
        <div class="card-box">
            <form action="" class="am-form" method="post"  data-am-validator id="doc-vld-msg">
                <fieldset>
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-vld-name-2">名称：</label>
                        <input type="text" id="doc-vld-name-2" value="{{.Resource.Name}}" name="name" class="am-form-field"/>
                    </div>
                    <div class="am-form-group">
                        <label for="doc-vld-name-2">资源Key：</label>
                        <input type="text" id="doc-vld-name-2" value="{{.Resource.Key}}"  name="key"  />
                    </div>
                    <div class="am-form-group">
                        <label for="doc-vld-mobile-2">资源地址：</label>
                        <input type="text" name="url"  value="{{.Resource.Url}}"  id="doc-vld-mobile-2"  />
                    </div>
                    <div class="am-form-group">
                        <label for="doc-vld-email-2">优先级：</label>
                        <input type="text" id="doc-vld-email-2" value="{{.Resource.Level}}"  name="level" placeholder="输入邮箱" />
                    </div>

                    <div class="am-form-group">
                        <label for="doc-vld-mobile-2">描述：</label>
                        <input type="text" name="description" value="{{.Resource.Description}}" id="doc-vld-mobile-2"/>
                    </div>
                    <div class="am-form-group">
                            <label class="am-u-md-2 am-md-text-right" for="doc-select-1">上级资源</label>
                            <select id="doc-select-1" name="pid">
                                <option value="0" {{if eq .Resource.Pid 0}} selected {{end}} >顶级菜单</option>
						            {{range .pRes}}
						            <option value={{.Id}}  {{if eq $.Resource.Pid .Id}} selected {{end}} >{{.Name}}</option>
						            {{end}}
                                    <option value="1000"  {{if eq $.Resource.Pid 1000}} selected {{end}} >无上级菜单</option>
                            </select>
                            <span class="am-form-caret"></span>				      
                    </div>
                    <div class="am-form-group">
                        <label>类型： </label>
                        <label class="am-radio-inline">
                        <input type="radio" value="0" name="type" {{if eq .Resource.Type "0"}} checked {{end}} >目录
                        </label>
                        <label class="am-radio-inline">
                        <input type="radio" value="1" name="type" {{if eq .Resource.Type "1"}} checked {{end}} >菜单
                        </label>
                        <label class="am-radio-inline">
                        <input type="radio" value="2" name="type" {{if eq .Resource.Type "2"}} checked {{end}} >按钮
                        </label>
                    </div>
                    <button class="am-btn am-btn-secondary" type="submit">提交</button>
                </fieldset>
            </form>


        </div>
    </div>
    <!-- Row end -->
</div>
</div>
</div>
<script src="/assets/js/formV.js"></script>